<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="{% static 'img/dx.png' %}" type="img" />
    
    <link rel="stylesheet" href="{% static 'plug-in/css/bootstrap.min.css' %}">
    <title>登录</title>
    <style>
        .account {
            width: 400px;
            border: 1px solid #dddddd;
            border-radius: 5px;
            box-shadow: 5px 5px 20px #aaa;

            margin-left: auto;
            margin-right: auto;
            margin-top: 100px;
            padding: 20px 40px;

            background-image: url("{% static 'img/bg2.png' %}");
            background-size: 100% auto;
            background-repeat: no-repeat;
            opacity: 0.8;
        }

        .account h2 {
            margin-top: 10px;
            text-align: center;
            color:gold;
        }


        .grid {
            display: flex;
            justify-content: space-around;
        }

        body {
            color: rgb(45, 255, 73);
            background-image: url("{% static 'img/bg1.jpg' %}");
            position: relative;
            width: 100%;
            height: 100%;
            background-attachment: fixed;
            background-repeat: no-repeat;
            background-size: cover;
            float: left;
        }
    </style>
</head>
<body>
    <div class="account">
        <h2>All The Best</h2>
        <form method="post" novalidate>
            {% csrf_token %}
            <div class="form-group">
                <label>用户名</label>
                {{form.username}}
                <span style="color: yellow;">{{form.username.errors.0}}</span>
            </div>
            <div class="form-group">
                <label>密码</label>
                {{form.password}}
                <span style="color: yellow;">{{form.password.errors.0}}</span>
            </div>
            {% if verity > 3 %}
            <div class="form-group">
                <label>验证码</label>
                <div class="row">
                    <div class="col-xs-7">
                        {{form.code}}
                        <span style="color: yellow;">{{form.code.errors.0}}</span>
                    </div>
                    <div class="col-xs-5">
                        <img id="img_code" src="/image/code/" style="width:125px">
                    </div>
                </div>
            </div>
            {% endif %}
            <div class="grid">
                <input type="submit" value="登 录" class="btn btn-primary">
                <button class="btn btn-primary"><a style="color:white;" href="/admin/sign/">注册</a></button>
            </div>

        </form>
    </div>
</body>
</html>